<% breadcrumb :sessions %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>签到监控设置</h5>
      </div>
      <div class="ibox-content">
        <div class="project-list">

          <!--<div class="row">
            <div class="col-sm-12">
              <%= link_to '新增会议日程', new_event_session_path, class: 'btn btn-white btn-sm pull-right' %>
            </div>
          </div> -->

          <div class="row">

          <table class="table table-hover">
            <tbody>

            <% @sessions.each do |session| %>
            <tr>
              <td class="session-date">
                <%= session.start_date %> <%= session.day_of_week_in_chinese %>
                <br>
                <small><%= session.start_time %> - <%= session.end_time %> </small>
              </td>
              <td class="session-name"><%= session.name %> </td>
              <td class="project-completion text-right">
                <% if session.checkin_enabled %>
                  <span class="label label-success">签到监控</span>
                <% end %>
              </td>

              <td class="text-right">
                <% if session.hidden? %>
                    <i class="fa fa-eye-slash"></i>
                <% else %>
                    <i class="fa fa-eye"></i>
                <% end %>
              </td>

              <td class="text-center">
                <% if session.company_checkin? %>
                    公司签到
                <% else %>
                    个人签到
                <% end %>
              </td>

              <!-- <td class="text-center">
                <% if session.question_enabled? %>
                    开启提问
                <% else %>
                    关闭提问
                <% end %>
              </td> -->


              <td class="project-actions">
                <%= link_to edit_event_checkin_monitor_path(current_event, session), class: 'btn btn-white btn-sm' do%>
                <i class="fa fa-pencil"></i> 修改
                <% end %>

                <%= link_to event_checkin_monitor_path(current_event, session), method: :delete, data: {confirm: '是否确认删除？'}, class: 'btn btn-white btn-sm' do %>
                  <i class="fa fa-trash"></i> 删除
                <% end %>
              </td>
            </tr>
            <% end %>

            </tbody>
          </table>
          </div>
        </div>

      </div>
    </div>
  </div>
</div>